/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package finger;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author daniel
 */
public class ConexaoBD {

    private String url = "jdbc:postgresql://localhost:5432/sisponto";
    private String driverName = "org.postgresql.Driver";
    private String usuario = "postgres";
    private String senha = "postgres";
    
//    private String url = "jdbc:postgresql://10.206.10.184:5434/sisru_dev";
//    private String url = "jdbc:postgresql://10.112.10.188:5432/sisru_dev";
//    private String driverName = "org.postgresql.Driver";
//    private String usuario = "sisru";
//    private String senha = "123456";

    private Connection conexao;

    public void open() throws ClassNotFoundException, SQLException{
        Class.forName(driverName);
        conexao = DriverManager.getConnection(url,usuario,senha);
    }

    public void close() throws SQLException {
        conexao.close();
    }

    public Connection getConexao() {
        return conexao;
    }

}
